home *** CD-ROM | disk | FTP | other *** search
/ New Masters of Flash / New Masters of Flash.iso / pc / MOVIES / 07.dir / 00100_Text_03.txt < prev    next >
Text File  |  2000-10-01  |  1KB  |  21 lines

  1. Create a standard button and make four copies. Align them as you like and add some labels (X, 1, 2, 3, 4).
  2.  
  3. Now we need to add some actions to the buttons. Click on the first one (X) and in the Object Actions window add:
  4.  
  5. on (press) {
  6.     /:current = ΓÇ£noneΓÇ¥ ;
  7. }
  8.  
  9. Add this action to the other buttons, replacing none with track1, track2, track3, and track4 as you work through buttons 1,2,3 and 4 respectively.
  10. ItΓÇÖs important to understand what the /:current variable does. 
  11.  
  12. /:current controls the choice that the user has selected. The colon plays a vital part in defining current as a variable. Without that colon, current would just represent a movie clip, or something similar. 
  13.  
  14. The five buttons are setting this variable value to:
  15. none : no sound is played, all tracks are stopped
  16. track1: track1 plays, all other tracks are stopped
  17. track2: track2 plays, all other tracks are stopped
  18. track3: track3 plays, all other tracks are stopped
  19. track4: track4 plays, all other tracks are stopped
  20. The next thing to do is add in a sound matrix, a system that will start to play the selected track and stop the previous one. 
  21.